from flask import Flask, render_template
from flask import config

app = Flask(__name__,template_folder='./static')   # template_folder可以改html文件访问的默认路径
app.config.from_object(config)


@app.route('/demo/')
def demo():
    return '<h2>手写html</h2>'


@app.route('/demo02/')
def demo02():
    return '''<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>登录界面</title>
</head>
<body>
<!--<form action="/login_request/" method="POST">-->
<form action="" method="POST">
    用户：<input type="text" name="username">
    密码：<input type="text" name="password">
    <input type="submit" value="提交">
</form>
</body>
</html>'''


@app.route('/demo03/')
def demo03():
    return render_template('login1.html')


@app.route('/demo04/')
def demo04():
    return render_template('qwq.html')


if __name__ == '__main__':
    app.run()